package com.learn.thread;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import lombok.SneakyThrows;

public class TestThreadSleep2 implements Runnable {
    @SneakyThrows
    @Override
    public void run() {
        while (true) {
            Thread.sleep(1000);
            System.out.println(DateTime.now());
        }
    }

    public static void main(String[] args) {
        new Thread(new TestThreadSleep2()).start();
    }
}
